<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div style="width: 100px;height:100px;background:red; transition: 2s;" id="ddv"></div>
    <p id="tim"></p>
    <button id="but">点击结束</button>
    <button id="but2">放大</button>
</body>
</html>
<script>

    function fn(){
        var date = new Date()
        tim.innerText = date
    }
    var set = setInterval(fn,1000)
    but.onclick = function(){
        clearInterval(set,1)
    }
    but2.onclick = function fn2(){
        var fn = document.getElementById('ddv')
        fn.style.width = `200px`
        fn.style.height = `200px`
        fn.style.background = `black`

    }
</script>